package com.yonyou.crm.tpub.excel.ctrl;

import java.util.Observable;
import java.util.Observer;

/**
 * 导入进度观察者
 */
public class ExcelProgressListener implements Observer {

	/**
	 * 进度百分比
	 */
	private double progress; 

	public double getProgress() {
		return progress;
	}

	public void setProgress(double progress) {
		this.progress = progress;
	}

	@Override
	public void update(Observable o, Object arg) {

		if (o instanceof ExcelProgressManager) {
			ExcelProgressManager ipObservable = (ExcelProgressManager)o;
//			new Thread(ipObservable).start();
			this.progress = ipObservable.getProgress();
		}
	}

}
